Open
Conversation
4 tasks
c81a48d to
c116923
Compare
mvdbeek
reviewed
Aug 12, 2025
|
|
||
| // Only handle same-origin requests | ||
| if (isSameOrigin) { | ||
| if (event.request.method === "GET" && url.pathname.startsWith(scoped)) { |
Member
There was a problem hiding this comment.
get requests include the session key, this might be a concern. How does the interception work, can a script that's loaded through the worker makes requests using their own shipped networking library ? Have you tried exploiting this with malicious archives ?
Contributor
Author
There was a problem hiding this comment.
I am experimenting with an option that injects the actual dataset and sandboxes the entire visualization. This would limit the file size, which is a drawback, but likely make it safe fyi.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GHOST is a Galaxy visualization that securely loads and displays static websites packaged
as ZIP-based QIIME 2 visualization (.qzv) files or similar archive formats. The archive is
fetched at runtime, unzipped in memory, and its contents are served to an embedded iframe
via a service worker. HTML files are automatically rebased so all relative paths resolve
through the service worker scope.
The service worker enforces a strict same-origin policy:
Forbidden response to prevent malicious HTML content from interacting with the Galaxy API.
This enables arbitrary client-side visualizations to run isolated from the main Galaxy UI,
while still loading all assets locally from the extracted archive.
Some example archives you can load:
https://raw.githubusercontent.com/qiime2/q2-fmt/master/demo/raincloud-baseline0.qzv
https://docs.qiime2.org/2024.2/data/tutorials/moving-pictures/core-metrics-results/faith-pd-group-significance.qzv
https://raw.githubusercontent.com/caporaso-lab/q2view-visualizations/main/uu-fasttree-empire.qzv